package cn.stylefeng.guns.modular.rest;


import cn.stylefeng.guns.modular.school.entity.*;
import cn.stylefeng.guns.modular.school.service.*;
import cn.stylefeng.guns.sys.core.properties.GunsProperties;
import cn.stylefeng.guns.sys.modular.system.entity.FileInfo;
import cn.stylefeng.guns.sys.modular.system.service.FileInfoService;
import cn.stylefeng.roses.core.base.controller.BaseController;
import cn.stylefeng.roses.core.reqres.response.ErrorResponseData;
import cn.stylefeng.roses.core.reqres.response.SuccessResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;


/**
 * 轮播图控制器
 *
 * @author
 * @Date 2019-11-18 13:24:11
 */
@RestController
@RequestMapping("/gunsApi/teacher")
public class ApiNeedTokenTeacherController extends BaseController {
    @Autowired
    private TeacherInfoService teacherInfoService;

    /**
     * 根据code找学生
     */
    @RequestMapping(value = "/code")
    public Object findStudentByCode(String code) {
        Map map = new HashMap();
        SuccessResponseData SUCCESS_TIP = new SuccessResponseData();
        // 学生信息
        TeacherInfo studentInfo = teacherInfoService.findByCode(code);

        map.put("teacherInfo", studentInfo);

        SUCCESS_TIP.setData(map);
        return SUCCESS_TIP;
    }

}


